package com.caiyi.financial.nirvana.sms.thread;

import com.caiyi.financial.nirvana.sms.jedis.JedisKey;
import com.caiyi.financial.nirvana.sms.jedis.JedisService;
import com.caiyi.financial.nirvana.sms.subscribe.ApiSubscribeListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ApiActionThread implements Runnable {

    private static final Logger logger = LoggerFactory.getLogger(ApiActionThread.class);

    public ApiActionThread() {
    }

    @Override
    public void run() {
        //订阅实现
        try {
            logger.info("ApiActionThread starting !!! ");
            JedisService.subscribe(ApiSubscribeListener.getInstance(), JedisKey.SMS_SUBSCRIBE_API_ACTION);
        } catch (Exception e) {
            logger.error("ApiActionThread error !!!", e);
        }
    }
}
